Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.

Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → A__FIRST(mark(X1), mark(X2))
MARK(and(X1, X2)) → MARK(X1)
MARK(from(X)) → A__FROM(X)
A__IF(false, X, Y) → MARK(Y)
MARK(first(X1, X2)) → MARK(X2)
A__AND(true, X) → MARK(X)
MARK(first(X1, X2)) → MARK(X1)
A__ADD(0, X) → MARK(X)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X1)
MARK(and(X1, X2)) → A__AND(mark(X1), X2)
MARK(add(X1, X2)) → A__ADD(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)

The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → A__FIRST(mark(X1), mark(X2))
MARK(and(X1, X2)) → MARK(X1)
MARK(from(X)) → A__FROM(X)
A__IF(false, X, Y) → MARK(Y)
MARK(first(X1, X2)) → MARK(X2)
A__AND(true, X) → MARK(X)
MARK(first(X1, X2)) → MARK(X1)
A__ADD(0, X) → MARK(X)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X1)
MARK(and(X1, X2)) → A__AND(mark(X1), X2)
MARK(add(X1, X2)) → A__ADD(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)

The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → A__FIRST(mark(X1), mark(X2))
MARK(and(X1, X2)) → MARK(X1)
MARK(from(X)) → A__FROM(X)
MARK(first(X1, X2)) → MARK(X2)
A__IF(false, X, Y) → MARK(Y)
A__AND(true, X) → MARK(X)
MARK(first(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → MARK(X1)
A__ADD(0, X) → MARK(X)
MARK(add(X1, X2)) → MARK(X1)
MARK(and(X1, X2)) → A__AND(mark(X1), X2)
MARK(add(X1, X2)) → A__ADD(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)

The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 2 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ DependencyGraphProof
QDP
              ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → MARK(X1)
A__ADD(0, X) → MARK(X)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X1)
MARK(and(X1, X2)) → MARK(X1)
MARK(and(X1, X2)) → A__AND(mark(X1), X2)
A__IF(false, X, Y) → MARK(Y)
MARK(first(X1, X2)) → MARK(X2)
MARK(add(X1, X2)) → A__ADD(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
A__AND(true, X) → MARK(X)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)

The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


MARK(first(X1, X2)) → MARK(X1)
A__ADD(0, X) → MARK(X)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X1)
MARK(and(X1, X2)) → MARK(X1)
MARK(and(X1, X2)) → A__AND(mark(X1), X2)
A__IF(false, X, Y) → MARK(Y)
MARK(first(X1, X2)) → MARK(X2)
MARK(add(X1, X2)) → A__ADD(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
A__AND(true, X) → MARK(X)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  MARK(x1)
first(x1, x2)  =  first(x1, x2)
A__ADD(x1, x2)  =  A__ADD(x2)
0  =  0
if(x1, x2, x3)  =  if(x1, x2, x3)
add(x1, x2)  =  add(x1, x2)
and(x1, x2)  =  and(x1, x2)
A__AND(x1, x2)  =  A__AND(x2)
mark(x1)  =  mark
A__IF(x1, x2, x3)  =  A__IF(x2, x3)
false  =  false
true  =  true
s(x1)  =  s
a__first(x1, x2)  =  x2
nil  =  nil
a__from(x1)  =  a__from
from(x1)  =  from
a__if(x1, x2, x3)  =  a__if(x1, x2, x3)
a__add(x1, x2)  =  a__add(x2)
cons(x1, x2)  =  cons
a__and(x1, x2)  =  x1

Lexicographic Path Order [19].
Precedence:
0 > MARK1 > mark > false > first2
0 > MARK1 > mark > nil > first2
0 > MARK1 > mark > afrom > s > first2
if3 > AIF2 > MARK1 > mark > false > first2
if3 > AIF2 > MARK1 > mark > nil > first2
if3 > AIF2 > MARK1 > mark > afrom > s > first2
if3 > aif3 > mark > false > first2
if3 > aif3 > mark > nil > first2
if3 > aif3 > mark > afrom > s > first2
add2 > AADD1 > MARK1 > mark > false > first2
add2 > AADD1 > MARK1 > mark > nil > first2
add2 > AADD1 > MARK1 > mark > afrom > s > first2
and2 > AAND1 > MARK1 > mark > false > first2
and2 > AAND1 > MARK1 > mark > nil > first2
and2 > AAND1 > MARK1 > mark > afrom > s > first2
true > first2
from > first2
aadd1 > mark > false > first2
aadd1 > mark > nil > first2
aadd1 > mark > afrom > s > first2
cons > first2

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ QDPOrderProof
QDP
                  ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.